package cn.yza.并发.Semaphore;

import java.util.concurrent.Semaphore;

/**
 * @author Honglixi
 * @create 2021-10-31 14:49
 */
public class SemaphoreTest {
    static Semaphore sp = new Semaphore(3);

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            new Student(sp,"学生" + i).start();
        }
    }
}
